From: Cosimo Cecchi Date: Wed, 4 Feb 2015 20:23:30 +0000 (-0800) Subject: StTextureCache: do not monitor files inside GResource X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~1013^2^2~1872 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=12b00501cc5eacc2c0bb63af98ea786892e96be8;p=gnome-shell.git StTextureCache: do not monitor files inside GResource This is wasteful, since GResource does not support file monitoring. Further, doing so will trigger a fallback code path in GLib that polls every second in a thread, which is doubly wasteful. https://bugzilla.gnome.org/show_bug.cgi?id=744013 --- diff --git a/src/st/st-texture-cache.c b/src/st/st-texture-cache.c index d39284410..5cc48e3fd 100644 --- a/src/st/st-texture-cache.c +++ b/src/st/st-texture-cache.c @@ -983,6 +983,12 @@ ensure_monitor_for_file (StTextureCache *cache, { StTextureCachePrivate *priv = cache->priv; + /* No point in trying to monitor files that are part of a + * GResource, since it does not support file monitoring. + */ + if (g_file_has_uri_scheme (file, "resource")) + return; + if (g_hash_table_lookup (priv->file_monitors, file) == NULL) { GFileMonitor *monitor = g_file_monitor_file (file, G_FILE_MONITOR_NONE,